<?php
/**
 * example
 */

use WxWorkSDK\WxWork;

require __DIR__ . "/vendor/autoload.php";
require __DIR__ . "/config.php";

//$result = WxWork::authorization(CORP_ID, SECRET)->getToken();

//$sm       = WxWork::sendMessage([
//                                    'access_token' => '',
//                                    'touser'       => '',
//                                    'totag'        => '',
//                                    'agentid'      => '',
//                                    'safe'         => 0
//                                ]);
//$text     = $sm->textToApp('');
//$textCart = $sm->textCardToAPP('', '', '');
//
//$sm     = WxWork::sendMessage(['access_token' => '',]);
//$create = $sm->createChat([]);K
//$create = $sm->updateChat('');
//$create = $sm->getChat('');
//
//$sm       = WxWork::sendMessage([
//                                    'access_token' => '',
//                                    'chatid'       => '',
//                                    'safe'         => 0
//                                ]);
//$text     = $sm->textToChat('');
//$textCart = $sm->textCardToChat('', '', '');

//$department = WxWork::department(TOKEN);
//$result     = $department->list(1);

//$userList = WxWork::member(TOKEN);
//$result   = $userList->list(2);
//var_dump($result->getContent());